<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>反馈意见</title>
		<link rel="stylesheet" href="/lzproject/CSS/layui.css">
		<link rel="stylesheet" href="/lzproject/CSS/global.css">
		<link rel="stylesheet" href="/lzproject/CSS/red.css">
		<link rel="stylesheet"  href="/lzproject/CSS/layer.css"/>
		<script type="text/javascript" src="/lzproject/Js/jquery.min.js"></script>
<script type="text/javascript">
	function insert() {
		$.ajax({
			//几个参数需要注意一下
			type : "GET",//方法类型
			dataType : "json",//预期服务器返回的数据类型
			data: $('#form1').serialize(),
			url : "/lzproject/suggestion.do",//url
			success : function(result) {
				alert("反馈成功！");
			},
			error : function() {
				alert("异常！");
			}
		});
	}
</script>
</head>

	<body>
		<h2>反馈意见</h2>
		<hr  class="layui-bg-blue">
		<form class="layui-form layui-form-pane" id="form1">
			<div class="layui-form-item">
				<label class="layui-form-label">用户名</label>
				<div class="layui-input-inline">
					<input type="text" name="suggestion_name" lay-verify="required" placeholder="可不填" autocomplete="off" class="layui-input">
				</div>
				<label class="layui-form-label">联系方式</label>
				<div class="layui-input-inline">
					<input type="text" name="contactway" lay-verify="required" placeholder="可不填" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">留言内容</label>
				<div class="layui-input-block">
					<textarea name="suggestion_content"   placeholder="请提出您宝贵的意见" class="layui-textarea"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<input type="button" class="layui-btn" onclick="insert()" value="确认提交">
			</div>
		</form>
	</body>

</html>